Imports System.Drawing
Imports System.Drawing.Drawing2D

Public Class LineJoins

    Private Sub LineJoins_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub LineJoins_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
        Dim cx As Integer = Me.Width
        Dim cy As Integer = Me.Height
        Dim penNarrow As Pen = New Pen(Color.Black)
        Dim penWide As Pen = New Pen(Color.Gray, cx / 16)
          Dim apt AS Point()       = { New Point(1 * cx / 32, 1 * cy / 8), _ 
                                new Point(4 * cx / 32,6 * cy /8), _
                                New Point(7 * cx / 32, 1 * cy / 8) }


        Dim i As Integer
        For i = 0 To 3
            penWide.LineJoin = i

            e.Graphics.DrawLines(penWide, apt)
            e.Graphics.DrawLines(penNarrow, apt)
            e.Graphics.TranslateTransform(cx / 4, 0)

        Next
    End Sub
End Class